<script type="text/javascript"><!--

navigator.geolocation.getCurrentPosition(successCallback, errorFallback);

function successCallback(position) {
    var lat = position.coords.latitude;
    var lon = position.coords.longitude;
    var ts = position.timestamp;
    // process coordinates
}

function errorFallback(err) {
    if (err.PERMISSION_DENIED) {
        // User does not consent to sharing location
    }
    else {
        // problem is beyond user's direct control
    }
}
 //--></script>
<form name='frm' method='post' action='geo.asp'>

<input type="submit" OnClick="successCallback()" value="teste">

</form>
